package com.dao.lx;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.entity.Serve;

public interface ServeDAO extends JpaRepository<Serve, Long>{
	@Query("from Serve s where s.serveClassify like ?1 and s.serveIfdelete = 1")
	public Page<Serve> queryByServeClassify(String serveClassify, Pageable p);
	
	@Query("from Serve s where s.serveWay like ?1 and s.serveIfdelete = 1")
	public Page<Serve> queryByServeWay(String serveWay, Pageable p);

	@Query("from Serve s where s.serveState like ?1 and s.serveIfdelete = 1")
	public Page<Serve> queryByServeState(String serveState, Pageable p);

	@Query("from Serve s where s.serveTopic like ?1 and s.serveIfdelete = 1")
	public Page<Serve> queryByServeTopic(String serveTopic, Pageable p);

	@Query("from Serve s where s.serveIfdelete = 1")
	public Page<Serve> findAllServeIfdelete(Pageable p);
}